import Opt from '@/components/dt/info/Opt.js'

class Column extends Opt {

  constructor() {
    super()
    this.build()
  }

  build() {
    this.createAll()
    this.opts.push(...this.all)
  }

  createAll() {
    this.all = [{
      type: 'index',
      title: '序号',
      width: 50,
      fixed: 'left',
      align: 'center'
    },
    {
      field: 'groupName',
      title: '组别',
      minWidth: 100,
      align: 'center'
    },
    {
      field: 'groupLeader',
      title: '是否组长',
      minWidth: 150,
      align: 'center',
      slots: {
        default: (params, h) => {
          return [h('div',
            params.row.groupLeader ? params.row.groupLeader == 1 ? '是' : '否' : '否'
          )]
        }
      }
    },
    {
      field: 'inGroupDate',
      title: '生效日期',
      minWidth: 90,
      align: 'center',
    }]
  }
}

export default Column